import { request } from "@/utils/http";

export const getAddressAPI = () => {
  return request({
    url: "/member/address",
  });
};

/**
 * 添加收货地址
 */
export const addAddressAPI = (data) => {
  return request({
    url: "/member/address",
    method: "post",
    data,
  });
};

/**
 * 更新收货地址
 */
export const updateAddressAPI = (id, data) => {
  return request({
    url: `/member/address/${id}`,
    method: "put",
    data,
  });
};


export const getAddressDetailAPI = (id) => {
  return request({ url: "/member/address/" + id });
};